package com.charles.seckillManagement.controller;

import com.charles.seckillComponentCommon.controller.BaseController;
import com.charles.seckillComponentCommon.domain.TableInfo;
import com.charles.seckillComponentSecurity.annotation.RolePermit;
import com.charles.seckillManagement.form.OrderListQuerys;
import com.charles.seckillManagement.mapper.SysOrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/order")
public class AdminOrderController extends BaseController {
    
    @Autowired
    private SysOrderMapper sysOrderMapper;

    /**
     * 订单列表
     */
    @GetMapping("getOrderTableList")
    @RolePermit(values = "admin")
    public TableInfo getOrderTableList(OrderListQuerys orderListQuerys) {
        startPage();
        return getDataTable(sysOrderMapper.queryOrderTableList(orderListQuerys));
    }

}
